package com.zmn.oms.dubbo.interfaces.normal.order;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.dubbo.dto.common.work.OrderTagAddDIO;
import com.zmn.oms.dubbo.dto.common.work.OrderTagCheckDIO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;


/**
 * 类描述：工单标签服务
 *
 * @author ligang
 * @date 2021/11/22 11:03
 */
@Api(
        value = "工单标签服务",
        tags = {"工单标签"}
)
public interface OrderTagRemoteService {

    /**
     * 添加工单标记
     *
     * @return
     */
    @ApiOperation(nickname = "addTag", value = "工单标记", notes = "工单标记", response = ResponseDTO.class)
    ResponseDTO addTag(@Valid OrderTagAddDIO orderTagAddDIO);

    /**
     * 检查工单是否有指定标记
     *
     * @return
     */
    @ApiOperation(nickname = "tagExistCheck", value = "工单标记", notes = "工单标记", response = ResponseDTO.class)
    ResponseDTO<Boolean> tagExistCheck(@Valid OrderTagCheckDIO OrderTagCheckDIO);

    /**
     *  检查工单是否有【排除工程师绩效】标签
     *
     * @author liudi
     * @return 如果有【排除工程师绩效标签】返回 true，反之则false。
     */
    @ApiOperation(nickname = "existsExcludePerformanceCategoryTag", value = "工单标记", notes = "工单标记", response = ResponseDTO.class)
    ResponseDTO<Boolean> existsExcludePerformanceCategoryTag(@NotNull(message = "订单号不能为空")Long orderId,
                                                             @NotNull(message = "工单号不能为空")Long workId);

    /**
     * 指定时间内， 派给工程师的同用户的订单中，是否有有效联系
     *
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation(nickname = "existContactEffectiveTagByOrderId", value = "指定时间内派给工程师的同用户的订单中，是否有有效联系", notes = "工单标记", response = ResponseDTO.class)
    ResponseDTO<Boolean> existContactEffectiveTagOrderByExcludeOrderId(@NotNull(message = "订单号不能为空") Long orderId, @NotNull(message = "工单号不能为空") Long workId);
}
